home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / shared.dir / 03054_Script_BACK BUTTON < prev    next >
Text File  |  1996-06-21  |  1KB  |  41 lines

  1. -- --------------------------------------------------------
  2. -- Handler checkBackButtonRoll checks if the user rolled
  3. -- over the back button
  4.  
  5. on checkBackButtonRoll mousePoint
  6.   global backButtonRect
  7.   
  8.   if (inside(mousePoint, backButtonRect)) then
  9.     hiliteBackButton
  10.   else if (NOT inside(mousePoint, backButtonRect)) then
  11.     unhiliteBackButton
  12.   end if
  13. end
  14.  
  15. -- --------------------------------------------------------
  16. -- Handler hiliteBackButton hilites the back button if the
  17. -- user rolled over it
  18.  
  19. on hiliteBackButton
  20.   global backSprite, backH, backV
  21.   
  22.   puppetSprite backSprite, TRUE
  23.   set the castNum of sprite backSprite = the number of cast "backH"
  24.   set the locH of sprite backSprite = backH
  25.   set the locV of sprite backSprite = backV
  26.   set the height of sprite backSprite = the height of cast "backH"
  27.   set the width of sprite backSprite = the width of cast "backH"
  28.   updateStage
  29. end
  30.  
  31. -- --------------------------------------------------------
  32. -- Handler unhiliteBackButton unhilites the back button if the
  33. -- user rolled over it
  34.  
  35. on unhiliteBackButton
  36.   puppetSprite backSprite, TRUE
  37.   global backSprite
  38.   
  39.   removeFromStage(backSprite)
  40.   puppetSprite backSprite, FALSE
  41. end